import request from '@/utils/request'

// 查询不合格品损失列表
export function listRejectsnLosses(query) {
  return request({
    url: '/quality/rejectsnLosses/list',
    method: 'get',
    params: query
  })
}

// 查询返工返修列表
export function listRejectsnLossesSelect(query) {
  return request({
    url: '/quality/rejectsnLosses/listSelect',
    method: 'get',
    params: query
  })
}

// 查询不合格品损失详细
export function getRejectsnLosses(rejectsnId) {
  return request({
    url: '/quality/rejectsnLosses/' + rejectsnId,
    method: 'get'
  })
}

// 新增不合格品损失
export function addRejectsnLosses(data) {
  return request({
    url: '/quality/rejectsnLosses',
    method: 'post',
    data: data
  })
}

// 修改不合格品损失
export function updateRejectsnLosses(data) {
  return request({
    url: '/quality/rejectsnLosses',
    method: 'put',
    data: data
  })
}

// 删除不合格品损失
export function delRejectsnLosses(rejectsnId) {
  return request({
    url: '/quality/rejectsnLosses/' + rejectsnId,
    method: 'delete'
  })
}
